package com.ut.demo.slice;


import ohos.app.Context;

/**
 * Created by cxzheng on 2018/4/29.
 */

public class DisplayUtil {

    public static int vp2px(Context context, float vpValue) {
        float scale = context.getResourceManager().getDeviceCapability().screenDensity/160f;
        return (int) (vpValue*scale);
    }

    public static boolean emptyOrNull(String str) {
        return str == null || str.length() == 0;
    }
}
